<template>
  <!-- 子程序节点 -->
  <div class="subroutine-node">
    <slot name="top" />
    <div class="node-content">
      {{ data.label }}
    </div>
    <slot name="bottom" />
  </div>
</template>

<script setup lang="ts">
interface Props {
  id: string
  data: {
    label: string
    nodeType: string
  }
}

defineProps<Props>()
</script>

<style scoped>
.subroutine-node {
  /* padding: 10px; */
  background: #fff;
  border: 1px solid #000;
  /* border-radius: 4px; */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: 80px;
  min-height: 40px;
}

/* .subroutine-node::before {
  content: '';
  position: absolute;
  top: 0px;
  left: 4px;
  right: 4px;
  bottom: 0px;
  border-left: 1px solid #000;
  border-right: 1px solid #000;
  pointer-events: none;
} */

.node-content {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12px;
  color: #000;
  font-weight: 500;
  z-index: 1;
  position: relative;
  height: 40px;
  min-width: 80px;
  border-left: #000 1px solid;
  border-right: #000 1px solid;
  margin: 0 4px;
}
</style>
